<?php
	header("content-type:text/html;charset=utf-8");
	$conn=mysqli_connect("localhost:3306","root","root","weidian");
	$username=$_POST["username"];
	$userpass=$_POST["userpass"];
	$sql="insert into user(username,userpass) values('$username','$userpass')";
	$result=mysqli_query($conn,$sql);
	if($result){
		echo 1;
	}else{
		echo 0;
	}
?>